package com.ruoyi.crm.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseFlowEntity;
import com.ruoyi.crm.domain.dto.FlowHisTaskDTO;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商机项目立项对象 crm_order_register
 *
 * @author yanwenliang
 * @date 2024-11-06
 */
@Data
@TableName("crm_order_register")
public class CrmOrderRegister extends BaseFlowEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 项目立项id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String orderRegisterId;

    /**
     * 商机id
     */
    @Excel(name = "商机id")
    private String orderId;

    /**
     * 所属部门id
     */
    @Excel(name = "所属部门id")
    private Long deptId;

    /**
     * 项目编号
     */
    @Excel(name = "项目编号")
    private String projectOn;

    /**
     * 项目名称
     */
    @Excel(name = "项目名称")
    private String projectName;

    /**
     * 立项时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "立项时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date projectTime;

    /**
     * 客户id
     */
    @Excel(name = "客户id")
    private String customerId;

    /**
     * 申请人id
     */
    @Excel(name = "申请人id")
    private String applyUser;

    /**
     * 负责人
     */
    @Excel(name = "负责人")
    private String chargeUser;

    /**
     * 项目性质
     */
    @Excel(name = "项目性质")
    private String nature;

    /**
     * 开始日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 结束日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 项目金额
     */
    @Excel(name = "项目金额")
    private BigDecimal projectSum;

    /**
     * 预计利润
     */
    @Excel(name = "预计利润")
    private BigDecimal profit;

    /**
     * 利润率
     */
    @Excel(name = "利润率")
    private BigDecimal profitMargin;

    /**
     * 费用总计
     */
    @Excel(name = "费用总计")
    private BigDecimal aggregationCharge;

    /**
     * 管理层意见
     */
    @Excel(name = "管理层意见")
    private String opinion;

    /**
     * 附件
     */
    @Excel(name = "附件")
    private String url;

    /**
     * 签订单位
     */
    @Excel(name = "签订单位")
    private String laborContracts;

    /**
     * 付款方式及时间
     */
    @Excel(name = "付款方式及时间")
    private String paymentTime;

    /**
     * 审核状态
     */
    private String auditStatus;

    /**
     * 删除标志(0 未删除 1 删除)
     */
    @TableLogic
    private String delFlag;

    /**
     * 费用明细
     */
    @TableField(exist = false)
    private List<CrmOrderRegisterDetails> detailsList;

    /**
     * 审批记录
     */
    @TableField(exist = false)
    private List<FlowHisTaskDTO> hisTaskList;

    @TableField(exist = false)
    private String customerName;
}
